package day10;

/**
 * @author oldliu
 * @since 1.0
 */
//public class TesTEx {
//    public static void main(String[] args) {
//        B b=new B();
//        System.out.println(b);
//    }
//}
class A{
    public A(){
        Exception e=new Exception();
        StackTraceElement[] stackTrace = e.getStackTrace();
        for (int i = 0; i < stackTrace.length; i++) {
            System.out.println(stackTrace[i].getClass());
            System.out.println(stackTrace[i].getClassName());
        }
        System.out.println(">>>>>>>>>>>>>>");
        try {
            System.out.println(Class.forName(stackTrace[stackTrace.length-2].getClassName()).getSuperclass()==A.class);
        } catch (ClassNotFoundException e1) {
            e1.printStackTrace();
        }
    }
}
public class B extends  A{
    public B(){

    }
    public static void main(String[] args) {
        B b=new B();
        System.out.println(b);
    }
}
